<!DOCTYPE html>
<html>

<head>
    <#include "/zz/components/meta.html" />
    <title>蓁奕科技 ${metaTitleSuffix!}</title>
    <#include "/zz/components/stylesheets.html" />
</head>

<body>
    <div id='app'>
        <el-container>
            <#assign menuIndex="1-1" />
            <#include "/zz/admin/components/menu.html" />
            <el-container>
                <#include "/zz/admin/components/header.html" />
                <el-main>
                    <template>
                        <el-row class="theme-color1" style="margin-bottom: 10px;">报名名单 - ${activityTitle!}</el-row>
                        <!-- <el-button @click='onAdd'>新增</el-button> -->
                        <el-table :data="items" style="width: 100%">
                            <!-- <el-table-column prop="id" label="id">
                            </el-table-column> -->
                            <el-table-column prop="name" label="姓名">
                            </el-table-column>
                            <el-table-column prop="mobile" label="电话">
                            </el-table-column>
                            <el-table-column prop="remark" label="备注">
                            </el-table-column>
                            <el-table-column prop="addTime" label="报名时间">
                            </el-table-column>
                            <el-table-column prop="status" label="状态" width="80">
                                <template slot-scope="scope">
                                    <span v-if='scope.row.status == 0'>未参加</span>
                                    <span v-if='scope.row.status == 1'>已参加</span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="attendTime" label="参加时间">
                            </el-table-column>
                            <el-table-column  label="操作" width="120">
                                <template slot-scope="scope">
                                    <el-button type="text" @click="onDelte(scope.row)" style="color: red;">取消报名</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                        <#include '/components/page.html' />
                    </template>
                </el-main>
            </el-container>
        </el-container>
        <#include "/zz/admin/components/footer.html" />
    </div>
    <#include "/zz/components/scripts.html" />
    <script type="text/javascript">
    var vue = new Vue({
        el: '#app',
        data() {
            return {
                items: ${items!'[]'}
            }
        },
        mounted: function() {},
        methods: {
            onDelte(info) {
                this.$confirm('确定取消报名?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    var param = {
                        enrollId: info.id
                    }
                    axiosRequest(param, '/zz/admin/activity/cancelEnroll', '')
                }).catch(() => {});
            }
        },
        filters: {
            fmt(date) {
                return date
            }
        }
    })
    </script>
</body>

</html>